package com.hdd.fmh.common.response;

import com.hdd.fmh.common.response.cache.ResultCodeCache;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * 返回类 
 * @param <T>
 */

@Data
@ApiModel("Api请求返回实体类")
public class ResultVo<T> implements Serializable{
	private static final long serialVersionUID = 5639511160918517232L;

	private static ResultCodeCache rCode = ResultCodeCache.getInstance();
	
	@ApiModelProperty("请求返回状态码，0000    表示请求成功")
	private String code;

	@ApiModelProperty("返回中文信息")
	private String msg ;

	@ApiModelProperty("返回状态码  true 表示请求成")
	private Boolean success = true;

	@ApiModelProperty("返回数据")
	private  T data = null;

	/**
	 *
	 * @param code 状态码
	 * @param msg 返回信息
	 * @param success 是否成果
	 * @param data 数据
	 */
	public ResultVo(String code,String msg,Boolean success) {
		this.code  = code;
		this.msg  =msg;
		this.success  = success;
	}
}
